{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import tensorflow as tf\n",
    "from tensorflow.examples.tutorials.mnist import input_data\n",
    "from matplotlib import pyplot as plt\n",
    "%matplotlib inline\n",
    "\n",
    "tf.logging.set_verbosity(tf.logging.INFO)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "WARNING: Logging before flag parsing goes to stderr.\n",
      "W0719 17:07:30.324391 12016 deprecation.py:323] From <ipython-input-3-557385135ea5>:1: read_data_sets (from tensorflow.contrib.learn.python.learn.datasets.mnist) is deprecated and will be removed in a future version.\n",
      "Instructions for updating:\n",
      "Please use alternatives such as official/mnist/dataset.py from tensorflow/models.\n",
      "W0719 17:07:30.332370 12016 deprecation.py:323] From D:\\Anaconda\\1\\envs\\tensorflow\\lib\\site-packages\\tensorflow\\contrib\\learn\\python\\learn\\datasets\\mnist.py:260: maybe_download (from tensorflow.contrib.learn.python.learn.datasets.base) is deprecated and will be removed in a future version.\n",
      "Instructions for updating:\n",
      "Please write your own downloading logic.\n",
      "W0719 17:07:30.334364 12016 deprecation.py:323] From D:\\Anaconda\\1\\envs\\tensorflow\\lib\\site-packages\\tensorflow\\contrib\\learn\\python\\learn\\datasets\\mnist.py:262: extract_images (from tensorflow.contrib.learn.python.learn.datasets.mnist) is deprecated and will be removed in a future version.\n",
      "Instructions for updating:\n",
      "Please use tf.data to implement this functionality.\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Extracting ./train-images-idx3-ubyte.gz\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "W0719 17:07:30.594669 12016 deprecation.py:323] From D:\\Anaconda\\1\\envs\\tensorflow\\lib\\site-packages\\tensorflow\\contrib\\learn\\python\\learn\\datasets\\mnist.py:267: extract_labels (from tensorflow.contrib.learn.python.learn.datasets.mnist) is deprecated and will be removed in a future version.\n",
      "Instructions for updating:\n",
      "Please use tf.data to implement this functionality.\n",
      "W0719 17:07:30.597664 12016 deprecation.py:323] From D:\\Anaconda\\1\\envs\\tensorflow\\lib\\site-packages\\tensorflow\\contrib\\learn\\python\\learn\\datasets\\mnist.py:110: dense_to_one_hot (from tensorflow.contrib.learn.python.learn.datasets.mnist) is deprecated and will be removed in a future version.\n",
      "Instructions for updating:\n",
      "Please use tf.one_hot on tensors.\n",
      "W0719 17:07:30.650522 12016 deprecation.py:323] From D:\\Anaconda\\1\\envs\\tensorflow\\lib\\site-packages\\tensorflow\\contrib\\learn\\python\\learn\\datasets\\mnist.py:290: DataSet.__init__ (from tensorflow.contrib.learn.python.learn.datasets.mnist) is deprecated and will be removed in a future version.\n",
      "Instructions for updating:\n",
      "Please use alternatives such as official/mnist/dataset.py from tensorflow/models.\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Extracting ./train-labels-idx1-ubyte.gz\n",
      "Extracting ./t10k-images-idx3-ubyte.gz\n",
      "Extracting ./t10k-labels-idx1-ubyte.gz\n",
      "(55000, 784)\n",
      "(55000, 10)\n",
      "(5000, 784)\n",
      "(5000, 10)\n",
      "(10000, 784)\n",
      "(10000, 10)\n"
     ]
    }
   ],
   "source": [
    "mnist = input_data.read_data_sets(\"./\", one_hot=True)\n",
    "\n",
    "print(mnist.train.images.shape)\n",
    "print(mnist.train.labels.shape)\n",
    "\n",
    "print(mnist.validation.images.shape)\n",
    "print(mnist.validation.labels.shape)\n",
    "\n",
    "print(mnist.test.images.shape)\n",
    "print(mnist.test.labels.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAeEAAAHiCAYAAADf3nSgAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X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AAA8IQkDAOAJ46jhNm814eGv3mLio06a7zRb9XhLE6d9WPpO5igrstrag9jv\nO3hCsT//mXMvMvH6SfVthXLb3XWlPZXp0vS1Tt0plXea+JmKkU9Ygl/hS1pe3Xa4iVO/mh7eHMWg\nzud2t6tODW916mYMGFqk5z5/6B1O+dCngrvVLSzSc5cm3AkDAOAJSRgAAE8Yjg6Ts2mziZsGNv/e\nFNauspSOb/KWdalr7fD/CTOudOp+6PRGxMetzdlj4u6v2QMWWoxY5bSruMYOLTfMirzB/9svdDLx\nO1WOc+q2H1nPxOnbE2cYLNGNnNfFxI1klseeJK6c9RtM3PDBDU5drwc7F+m5D5XycVgKd8IAAHhC\nEgYAwBOSMAAAnjAnDK9yFi8zca2ebl0viW5OqYnYufvsAtoV2I8//4xYV+WPlbZdjM+P+Fh9WuS6\ntE/TIlcCpQR3wgAAeEISBgDAE4ajAZRZSXvt1mdPbjrMqav18uTw5kCpw50wAACekIQBAPCEJAwA\ngCfMCQMos5rf/rOJJ0lljz0BYsOdMAAAnpCEAQDwRGmtffcBAIByiTthAAA8IQkDAOAJSRgAAE9I\nwgAAeEISBgDAE5IwAACekIQBAPCEJAwAgCckYQAAPCEJAwDgCUkYAABPSMIAAHhCEgYAwBOSMAAA\nnpCEAQDwhCQMAIAnJGEAADwhCQMA4AlJGAAAT0jCAAB4QhIGAMATkjAAAJ6QhAEA8OT/AarNvdID\n4hLFAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x1896fdd7198>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.figure(figsize=(8,8))\n",
    "\n",
    "for idx in range(16):\n",
    "    plt.subplot(4,4,idx+1)\n",
    "    plt.axis('off')\n",
    "    plt.title('[{}]'.format(np.argmax(mnist.train.labels[idx])))\n",
    "    plt.imshow(mnist.train.images[idx].reshape((28,28)))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "x = tf.placeholder(\"float\", [None, 784], name='x')\n",
    "y = tf.placeholder(\"float\", [None, 10], name='y')#定义输入输出"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "#一维还原成二维\n",
    "x_image=tf.reshape(x,[-1,28,28,1])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "#定义第一个卷积层,6个5*5大小，padding方式为沿边卷积，激活函数为relu，输出为24*24，深度为6\n",
    "with tf.name_scope('conv1'):\n",
    "    c1=tf.contrib.slim.conv2d(x_image,6,[5,5],padding='VALID',activation_fn=tf.nn.relu)\n",
    "    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "#最大池化，步长为二，输出为12*12，深度为6\n",
    "with tf.name_scope('pool1'):\n",
    "    s2=tf.contrib.slim.max_pool2d(c1,[2,2],stride=[2,2],padding='VALID')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "#第二个卷积层，16个5*5，padding还是valid，激活函数为relu，输出8*8，深度16\n",
    "with tf.name_scope('conv2'):\n",
    "    c3=tf.contrib.slim.conv2d(s2,16,[5,5],padding='VALID',activation_fn=tf.nn.relu)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "#第二个池化，最大池化，步长为2，输出为4*4，深度16\n",
    "with tf.name_scope('pool2'):\n",
    "    s4=tf.contrib.slim.max_pool2d(c3,[2,2],stride=[2,2],padding='VALID')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "W0719 17:07:40.012277 12016 deprecation.py:323] From D:\\Anaconda\\1\\envs\\tensorflow\\lib\\site-packages\\tensorflow\\contrib\\layers\\python\\layers\\layers.py:1634: flatten (from tensorflow.python.layers.core) is deprecated and will be removed in a future version.\n",
      "Instructions for updating:\n",
      "Use keras.layers.flatten instead.\n"
     ]
    }
   ],
   "source": [
    "#池化数据是3维的，需要变成一维\n",
    "with tf.name_scope('fc1'):\n",
    "    s4_flat=tf.contrib.slim.flatten(s4)\n",
    "#2个全连接层，隐层120，84\n",
    "    c5=tf.contrib.slim.fully_connected(s4_flat,120,activation_fn=tf.nn.relu)\n",
    "with tf.name_scope('fc1'):\n",
    "    f6=tf.contrib.slim.fully_connected(c5,84,activation_fn=tf.nn.relu)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "W0719 17:07:41.451017 12016 deprecation.py:506] From <ipython-input-12-771fe21435df>:4: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version.\n",
      "Instructions for updating:\n",
      "Please use `rate` instead of `keep_prob`. Rate should be set to `rate = 1 - keep_prob`.\n"
     ]
    }
   ],
   "source": [
    "#是用dropout\n",
    "with tf.name_scope('dropout'):\n",
    "    keep_prob=tf.placeholder(name='keep_prob',dtype=tf.float32)\n",
    "    f6_drop=tf.nn.dropout(f6,keep_prob)\n",
    "    \n",
    "with tf.name_scope('fc3'):\n",
    "    logits=tf.contrib.slim.fully_connected(f6_drop,10,activation_fn=None)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "W0719 17:07:43.438529 12016 deprecation.py:323] From <ipython-input-13-18ab612a422e>:2: softmax_cross_entropy_with_logits (from tensorflow.python.ops.nn_ops) is deprecated and will be removed in a future version.\n",
      "Instructions for updating:\n",
      "\n",
      "Future major versions of TensorFlow will allow gradients to flow\n",
      "into the labels input on backprop by default.\n",
      "\n",
      "See `tf.nn.softmax_cross_entropy_with_logits_v2`.\n",
      "\n",
      "I0719 17:07:43.481415 12016 summary_op_util.py:66] Summary name Conv/weights:0 is illegal; using Conv/weights_0 instead.\n",
      "I0719 17:07:43.486405 12016 summary_op_util.py:66] Summary name Conv/biases:0 is illegal; using Conv/biases_0 instead.\n",
      "I0719 17:07:43.494382 12016 summary_op_util.py:66] Summary name Conv_1/weights:0 is illegal; using Conv_1/weights_0 instead.\n",
      "I0719 17:07:43.501364 12016 summary_op_util.py:66] Summary name Conv_1/biases:0 is illegal; using Conv_1/biases_0 instead.\n",
      "I0719 17:07:43.505353 12016 summary_op_util.py:66] Summary name fully_connected/weights:0 is illegal; using fully_connected/weights_0 instead.\n",
      "I0719 17:07:43.510338 12016 summary_op_util.py:66] Summary name fully_connected/biases:0 is illegal; using fully_connected/biases_0 instead.\n",
      "I0719 17:07:43.515326 12016 summary_op_util.py:66] Summary name fully_connected_1/weights:0 is illegal; using fully_connected_1/weights_0 instead.\n",
      "I0719 17:07:43.520313 12016 summary_op_util.py:66] Summary name fully_connected_1/biases:0 is illegal; using fully_connected_1/biases_0 instead.\n",
      "I0719 17:07:43.526297 12016 summary_op_util.py:66] Summary name fully_connected_2/weights:0 is illegal; using fully_connected_2/weights_0 instead.\n",
      "I0719 17:07:43.532280 12016 summary_op_util.py:66] Summary name fully_connected_2/biases:0 is illegal; using fully_connected_2/biases_0 instead.\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Conv/weights:0\n",
      "Conv/biases:0\n",
      "Conv_1/weights:0\n",
      "Conv_1/biases:0\n",
      "fully_connected/weights:0\n",
      "fully_connected/biases:0\n",
      "fully_connected_1/weights:0\n",
      "fully_connected_1/biases:0\n",
      "fully_connected_2/weights:0\n",
      "fully_connected_2/biases:0\n"
     ]
    }
   ],
   "source": [
    "#定义交叉熵损失\n",
    "cross_entropy_loss=tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(logits=logits,labels=y))\n",
    "l2_loss=tf.add_n([tf.nn.l2_loss(w)\n",
    "                 for w in tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES)])\n",
    "for w in tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES):\n",
    "    print(w.name)\n",
    "    tf.summary.histogram(w.name,w)\n",
    "total_loss=cross_entropy_loss+7e-5*l2_loss\n",
    "tf.summary.scalar('cross_entropy_loss',cross_entropy_loss)\n",
    "tf.summary.scalar('l2_loss',l2_loss)\n",
    "tf.summary.scalar('total_loss',total_loss)\n",
    "optimizer=tf.train.GradientDescentOptimizer(learning_rate=0.3).minimize(total_loss)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "#得到概率分布以及计算正确率\n",
    "pred=tf.nn.softmax(logits)\n",
    "correct_pred=tf.equal(tf.math.argmax(y,1),tf.math.argmax(logits,1))\n",
    "accuracy=tf.reduce_mean(tf.cast(correct_pred,tf.float32))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "batch_size=100\n",
    "training_step=1100\n",
    "saver=tf.train.Saver()#存储图形"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "100 次训练后,损失值为：0.222858,准确率为：0.9278\n",
      "200 次训练后,损失值为：0.151633,准确率为：0.9642\n",
      "300 次训练后,损失值为：0.351344,准确率为：0.963\n",
      "400 次训练后,损失值为：0.0597357,准确率为：0.969\n",
      "500 次训练后,损失值为：0.129093,准确率为：0.9722\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "W0719 17:08:06.581877 12016 deprecation.py:323] From D:\\Anaconda\\1\\envs\\tensorflow\\lib\\site-packages\\tensorflow\\python\\training\\saver.py:960: remove_checkpoint (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version.\n",
      "Instructions for updating:\n",
      "Use standard file APIs to delete files with this prefix.\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "600 次训练后,损失值为：0.244537,准确率为：0.9724\n",
      "700 次训练后,损失值为：0.0928133,准确率为：0.9786\n",
      "800 次训练后,损失值为：0.199552,准确率为：0.975\n",
      "900 次训练后,损失值为：0.0414715,准确率为：0.9816\n",
      "1000 次训练后,损失值为：0.0971517,准确率为：0.9782\n",
      "训练结束\n",
      "测试集准确率： 0.9813\n"
     ]
    }
   ],
   "source": [
    "#以上定义了网络形状，接下来创建session进行训练\n",
    "merged=tf.summary.merge_all()\n",
    "with tf.Session() as sess:\n",
    "    writer=tf.summary.FileWriter('logs/',sess.graph)\n",
    "    sess.run(tf.global_variables_initializer())\n",
    "#定义验证集和测试集\n",
    "    validata_data={\n",
    "        x:mnist.validation.images,\n",
    "        y:mnist.validation.labels,\n",
    "        keep_prob:1.0\n",
    "    }\n",
    "    test_data={x:mnist.test.images,y:mnist.test.labels,keep_prob:1.0}\n",
    "    for i in range(training_step):\n",
    "        xs,ys=mnist.train.next_batch(batch_size)\n",
    "        _,loss,rs=sess.run(\n",
    "        [optimizer,cross_entropy_loss,merged],\n",
    "        feed_dict={x:xs,y:ys,keep_prob:0.6})\n",
    "        writer.add_summary(rs,i)\n",
    "        #每一百次验证损失值和准确率\n",
    "        if i>0 and i%100==0:\n",
    "            validata_accuracy=sess.run(accuracy,feed_dict=validata_data)\n",
    "            print('%d 次训练后,损失值为：%g,准确率为：%g'%(i,loss,validata_accuracy))\n",
    "            saver.save(sess,'./model.ckpt',global_step=i)\n",
    "    print('训练结束')\n",
    "    acc=sess.run(accuracy,feed_dict=test_data)\n",
    "    print('测试集准确率：',acc)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "卷积的特性：\n",
    "卷积能将像素特征进行一定程度的提取，具有一定粗模糊的功能，将不必要的细节忽略\n",
    "同时他具有线性移不变性\n",
    "使用CNN网络比传统全连接神经网络具有如下几个优势：\n",
    "局部感知：CNN通过卷积核局部感知图像，再通过扫描完成对图像整体的感知，这样计算量小。\n",
    "同时全连接的参数量太大，而卷积通过卷积核进行滤波减少了许多参数，减小内存和计算量\n",
    "可以使用多种卷积核，提取不同特征，减少了对图像的多余重复扫描计算。便于分类。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
